import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopOrderExpressController } from '../../../controllers';
const uctoominishopOrderExpressRouter = new Router();
const minishopOrderExpressController = new uctooMinishopOrderExpressController();

uctoominishopOrderExpressRouter.post('/add', requireUser, minishopOrderExpressController.add);
uctoominishopOrderExpressRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_order_express'), minishopOrderExpressController.edit);
uctoominishopOrderExpressRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_order_express'), minishopOrderExpressController.delete);

//For getting minishopOrderExpress with permission control
uctoominishopOrderExpressRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_order_express'), minishopOrderExpressController.getSingle);
uctoominishopOrderExpressRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_order_express'), minishopOrderExpressController.getMany);
uctoominishopOrderExpressRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_order_express'), minishopOrderExpressController.getMany);

//#endregion AutoCreateCode
export default uctoominishopOrderExpressRouter;
